﻿<Window x:Class="TFlic.View.ColumnPopup"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:TFlic.View"
        xmlns:vm="clr-namespace:TFlic.ViewModel"
        mc:Ignorable="d"
        
        Title="CreateColumnPopup" Height="200" Width="500"
        WindowStyle="None"
        WindowStartupLocation="CenterScreen"
        Background="Transparent"
        AllowsTransparency="True"
        ResizeMode="NoResize"
        MouseDown="Window_MouseDown">

    <Window.DataContext>
        <vm:BoardWindowViewModel/>
    </Window.DataContext>

    <Border CornerRadius="15">

        <Border CornerRadius="15" 
                BorderThickness="5" 
                Opacity="1">

            <Border.BorderBrush>
                <SolidColorBrush Color="#565656" Opacity="1"/>
            </Border.BorderBrush>
            <Border.Background>
                <LinearGradientBrush StartPoint="0,0" EndPoint="1,1">
                    <GradientStop Color="#5F5F5F" Offset="0"/>
                    <GradientStop Color="#6A6A6A" Offset="0.25"/>
                    <GradientStop Color="#8E8E8E" Offset="0.5"/>
                    <GradientStop Color="#6A6A6A" Offset="0.75"/>
                    <GradientStop Color="#5F5F5F" Offset="1"/>
                </LinearGradientBrush>
            </Border.Background>

            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="25"/>
                    <RowDefinition/>
                </Grid.RowDefinitions>

                <!-- Grid элементов управления окном -->
                <Grid Grid.Row="0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition />
                        <ColumnDefinition Width="25"/>
                    </Grid.ColumnDefinitions>

                    <TextBlock Text="Параметры колонки"
                       FontSize="20"
                       Grid.Column="0"
                       VerticalAlignment="Center"
                       HorizontalAlignment="Center"
                       Margin="10,0,0,0"/>

                    <Button x:Name="BClose"  
                            Grid.Column="3" 
                            Click="BClose_Click"
                            Style="{DynamicResource CloseWindowButtonStyle}"
                            Template="{DynamicResource CloseWindowButtonTemplate}" Cursor="Arrow"/>
                </Grid>

                <Grid Grid.Row="1">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition/>
                        <ColumnDefinition Width="400"/>
                        <ColumnDefinition/>
                    </Grid.ColumnDefinitions>

                    <StackPanel Grid.Column="1"
                                    VerticalAlignment="Center"
                                    Margin="0,0,0,40">

                        <TextBlock Text="Название колонки" 
                                   FontSize="12" 
                                   FontWeight="Medium"/>
                        <TextBox x:Name="NameColumn" 
                                 FontSize="13" 
                                 Height="28" 
                                 Margin="0,5,0,0" 
                                 MaxLength="20"
                                 Text="{Binding NameNewColumn, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>

                        <StackPanel Orientation="Horizontal"
                                    HorizontalAlignment="Center"
                                    Margin="0,10,0,0">
                            <Button x:Name="Rename" 
                                Content="Переименовать" 
                                Grid.Column="1" 
                                Margin="0,0,10,0"
                                Width="180"
                                Height="25"
                                Style="{DynamicResource ButtonStyle}"
                                Template="{DynamicResource ButtonTemplate}" Cursor="Arrow"
                                Click="Rename_Click"/>

                            <Button x:Name="Delete" 
                                Content="Удалить" 
                                Grid.Column="1" 
                                Margin="0,0,0,0"
                                Width="180"
                                Height="25"
                                Style="{DynamicResource ButtonStyle}"
                                Template="{DynamicResource ButtonTemplate}" Cursor="Arrow"
                                Click="Delete_Click"/>
                        </StackPanel>
                    </StackPanel>
                </Grid>
            </Grid>
        </Border>
    </Border>
</Window>
